package progress.exa35;

import java.io.IOException;

public class FileFormatException extends IOException {

    public FileFormatException(){}

    public FileFormatException(String s){
        super(s);
    }

    public static void main(String[] args) {
        try{
            throwFiledFormatException("File:fff");
        }catch (IOException e){
            e.printStackTrace();
        }
    }

    public static void throwFiledFormatException(String file) throws FileFormatException {
        if(file.contains(":")){
            throw new FileFormatException("file 不能包含：字符");
        }
    }
}
